﻿<UserControl x:Class="Conqueror.WP.View.CurrentGameTile"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="144" d:DesignWidth="144">
    
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="{Binding MapImage}" Stretch="UniformToFill">
                <ImageBrush.RelativeTransform>
                    <CompositeTransform CenterY="0.5" CenterX="0.5" ScaleX="1.5" ScaleY="1.5"/>
                </ImageBrush.RelativeTransform>
            </ImageBrush>
        </Grid.Background>

        <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Top"
                    Margin="12,12,0,0" Background="#C8000000" >
            <Border HorizontalAlignment="Stretch"
                    Height="26">
                <Grid>
                    <Image Source="/Image/Icons/appbar.message.png" Stretch="Uniform"
                           HorizontalAlignment="Left" Height="26"
                           Visibility="Collapsed"/>
                
                    <TextBlock Text="{Binding TimeString}" FontSize="{StaticResource PhoneFontSizeSmall}"
                               HorizontalAlignment="Right" Margin="12,0" Foreground="White"/>
                </Grid>
            </Border>
            <Border Background="{Binding CurrentPlayerBrush}" Height="6"/>
        </StackPanel>

        <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
                    Margin="0,0,12,12" Background="#C8000000" >
            <Border Background="{Binding CurrentPlayerBrush}" Height="6"/>
            <Border HorizontalAlignment="Stretch"
                    Height="26">
                <TextBlock Text="{Binding Players[0].PlayerName}" FontSize="{StaticResource PhoneFontSizeSmall}"
                           Margin="12,0" Foreground="White"/>
            </Border>
        </StackPanel>

    </Grid>
</UserControl>